/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.clooud.util.ec;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;

/**
 *
 * @author selvino
 */
public class EC {

    public static ExternalContext get() {
       return FacesContext.getCurrentInstance().getExternalContext();
    }

    public static void redirect(String url) {
        try {
            get().redirect(url);
        } catch (IOException ex) {
            Logger.getLogger(EC.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}
